<template>
  <div class="header">
    <!-- 左侧logo -->
    <div class="logo">
      <!-- <img class="logo0" src="logo0.jpg"> -->
      <!-- <h2>玩转娱乐</h2> -->
      <img src="logo.jpg" class="logo0" />
      <img src="logo1.jpg" class="logo1" />
    </div>
    <!-- 主菜单 -->
    <div
      class="header-menu"
      :class="{ 'header-menu-change-search': isChangeSearch }"
    >
      <router-link active-class="active" to="/treasure" class="link1"
        >正在热映</router-link
      >
      <router-link active-class="active" to="/record" class="link2"
        >即将上映</router-link
      >
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      isChangeSearch: false,
    };
  },
  methods: {
    changeStyle() {
      this.isChangeSearch = !this.isChangeSearch;
      console.log("聚焦");
    },
  },
};
</script>

<style lang="scss" scoped>
.logo0 {
  width: 180px;
  height: 50px;
  position: absolute;
  margin-left: -10px;
  margin-top: 0px;
}
.logo1 {
  width: 250px;
  height: 60px;
  position: absolute;
  margin-top: -30px;
  margin-left: 180px;
}

.header {
  background-color: #fff;
  // background: -webkit-linear-gradient(
  //   left,
  //   rgb(145, 217, 246) 0%,
  //   #db6ff3 100%
  // );
  display: flex;
  align-items: center;
  flex-shrink: 0;
  height: 58px;
  width: 100%;
  border-bottom: 1px solid rgba(113 119 144 / 25%);
  padding: 0 30px;
  white-space: nowrap;
  @media screen and (max-width: 480px) {
    padding: 0 16px;
  }

  .logo {
    width: 96px;
    height: 30px;
    margin-right: 110px;
    flex-shrink: 0;
    display: flex;
    flex-direction: row;
    align-items: center;

    @media screen and (max-width: 945px) {
      display: none;
    }

    h2 {
      background-image: linear-gradient(#d476e9, #db6ff3);
      background-clip: text;
      -webkit-background-clip: text;
      color: transparent;
      font-size: 30px;
      letter-spacing: 0.3em;
    }
    svg {
      //fill:currentColor;
      fill: #db6ff3;
    }
    .logo0 {
      width: 180px;
      height: 50px;
    }
  }

  /* .head-menu 悬浮在右侧*/
  &-menu {
    display: flex;
    align-items: center;
    //text-align: center;
    //padding: 0 16px 0 20px;
    margin-left: auto;
    flex-shrink: 0;
    width: 100%;
    max-width: 200px;

    a {
      padding: 20px 30px;
      text-decoration: none;
      color: rgb(60, 62, 70);
      border-bottom: 2px solid transparent;
      transition: 0.3s;
      @media screen and (max-width: 610px) {
        &:not(.main-header-link) {
          display: none;
        }
      }
    }
    a:hover,
    a.active {
      color: #fff;
      background-color: #3a6df0;
      border-bottom: 2px solid #242222;
    }
  }

  .notify {
    position: relative;
    &:before {
      content: "";
      position: absolute;
      background-color: #3a6df0;
      width: 6px;
      height: 6px;
      border-radius: 50%;
      right: 20px;
      top: 16px;
    }
    @media screen and (max-width: 1055px) {
      display: none;
    }
  }
}
</style>